home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1996-01-24 | 15.9 KB | 700 lines | [ TEXT/MPS ]
; ; File: GXLayout.a ; ; Contains: QuickDraw GX layout routine interfaces. ; ; Version: Technology: Quickdraw GX 1.1 ; Package: Universal Interfaces 2.2 in “MPW” on ETO #20 ; ; Copyright: © 1984-1995 by Apple Computer, Inc. ; All rights reserved. ; ; Bugs?: If you find a problem with this file, use the Apple Bug Reporter ; stack. Include the file and version information (from above) ; in the problem description and send to: ; Internet: apple.bugs@applelink.apple.com ; AppleLink: APPLE.BUGS ; ; IF &TYPE('__GXLAYOUT__') = 'UNDEFINED' THEN __GXLAYOUT__ SET 1 IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN include 'ConditionalMacros.a' ENDIF IF &TYPE('__GXTYPES__') = 'UNDEFINED' THEN include 'GXTypes.a' ENDIF ; include 'Types.a' ; ; include 'MixedMode.a' ; ; include 'GXMath.a' ; ; include 'FixMath.a' ; layoutRoutinesIncludes: SET 1 ; ; gxShape GXNewLayout(long textRunCount, const short textRunLengths[], const void *text[], long styleRunCount, const short styleRunLengths[], const gxStyle styles[], long levelRunCount, const short levelRunLengths[], const short levels[], const gxLayoutOptions *layoutOptions, const gxPoint *position) ; IF ¬ GENERATINGCFM THEN Macro _GXNewLayout move.w #$0,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXNewLayout ENDIF ; ; long GXGetLayout(gxShape layout, void *text, long *styleRunCount, short styleRunLengths[], gxStyle styles[], long *levelRunCount, short levelRunLengths[], short levels[], gxLayoutOptions *layoutOptions, gxPoint *position) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLayout move.w #$1,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLayout ENDIF ; ; void GXSetLayout(gxShape layout, long textRunCount, const short textRunLengths[], const void *text[], long styleRunCount, const short styleRunLengths[], const gxStyle styles[], long levelRunCount, const short levelRunLengths[], const short levels[], const gxLayoutOptions *layoutOptions, const gxPoint *position) ; IF ¬ GENERATINGCFM THEN Macro _GXSetLayout move.w #$2,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetLayout ENDIF ; ; void GXDrawLayout(long textRunCount, const short textRunLengths[], const void *text[], long styleRunCount, const short styleRunLengths[], const gxStyle styles[], long levelRunCount, const short levelRunLengths[], const short levels[], const gxLayoutOptions *layoutOptions, const gxPoint *position) ; IF ¬ GENERATINGCFM THEN Macro _GXDrawLayout move.w #$3,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXDrawLayout ENDIF ; ; void GXSetLayoutParts(gxShape layout, gxByteOffset oldStartOffset, gxByteOffset oldEndOffset, long newTextRunCount, const short newTextRunLengths[], const void *newText[], long newStyleRunCount, const short newStyleRunLengths[], const gxStyle newStyles[], long newLevelRunCount, const short newLevelRunLengths[], const short newLevels[]) ; IF ¬ GENERATINGCFM THEN Macro _GXSetLayoutParts move.w #$4,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetLayoutParts ENDIF ; ; void GXSetLayoutShapeParts(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset, gxShape insert) ; IF ¬ GENERATINGCFM THEN Macro _GXSetLayoutShapeParts move.w #$5,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetLayoutShapeParts ENDIF ; ; long GXGetLayoutParts(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset, void *text, long *styleRunCount, short styleRunLengths[], gxStyle styles[], long *levelRunCount, short levelRunLengths[], short levels[]) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLayoutParts move.w #$6,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLayoutParts ENDIF ; ; gxShape GXGetLayoutShapeParts(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset, gxShape dest) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLayoutShapeParts move.w #$7,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLayoutShapeParts ENDIF ; ; long GXGetLayoutGlyphs(gxShape layout, gxGlyphcode *glyphs, gxPoint positions[], long advance[], gxPoint tangents[], long *runCount, short styleRuns[], gxStyle glyphStyles[]) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLayoutGlyphs move.w #$8,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLayoutGlyphs ENDIF ; ; gxByteOffset GXHitTestLayout(gxShape layout, const gxPoint *hitDown, gxHighlightType highlightType, gxLayoutHitInfo *hitInfo, gxShape hitTrackingArea) ; IF ¬ GENERATINGCFM THEN Macro _GXHitTestLayout move.w #$9,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXHitTestLayout ENDIF ; ; gxShape GXGetLayoutHighlight(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset, gxHighlightType highlightType, gxShape highlight) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLayoutHighlight move.w #$a,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLayoutHighlight ENDIF ; ; gxShape GXGetLayoutVisualHighlight(gxShape layout, gxByteOffset startOffset, long startLeadingEdge, gxByteOffset endOffset, long endLeadingEdge, gxHighlightType highlightType, gxShape highlight) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLayoutVisualHighlight move.w #$b,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLayoutVisualHighlight ENDIF ; ; gxShape GXGetLayoutCaret(gxShape layout, gxByteOffset offset, gxHighlightType highlightType, gxCaretType caretType, gxShape caret) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLayoutCaret move.w #$c,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLayoutCaret ENDIF ; ; gxByteOffset GXGetLayoutBreakOffset(gxShape layout, gxByteOffset startOffset, Fixed lineWidth, long hyphenationCount, const gxByteOffset hyphenationPoints[], Boolean *startIsStaked, gxByteOffset *priorStake, gxByteOffset *nextStake) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLayoutBreakOffset move.w #$d,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLayoutBreakOffset ENDIF ; ; Fixed GXGetLayoutRangeWidth(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset, gxShape supplementaryText) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLayoutRangeWidth move.w #$e,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLayoutRangeWidth ENDIF ; ; gxShape GXNewLayoutFromRange(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset, const gxLayoutOptions *layoutOptions, gxShape supplementaryText) ; IF ¬ GENERATINGCFM THEN Macro _GXNewLayoutFromRange move.w #$f,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXNewLayoutFromRange ENDIF ; ; gxShape GXGetCaretAngleArea(gxShape layout, const gxPoint *hitPoint, gxHighlightType highlightType, gxShape caretArea, short *returnedRise, short *returnedRun) ; IF ¬ GENERATINGCFM THEN Macro _GXGetCaretAngleArea move.w #$10,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetCaretAngleArea ENDIF ; ; void GXGetStyleBaselineDeltas(gxStyle baseStyle, gxBaselineType baseType, gxBaselineDeltas returnedDeltas) ; IF ¬ GENERATINGCFM THEN Macro _GXGetStyleBaselineDeltas move.w #$11,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetStyleBaselineDeltas ENDIF ; ; gxByteOffset GXGetRightVisualOffset(gxShape layout, gxByteOffset currentOffset) ; IF ¬ GENERATINGCFM THEN Macro _GXGetRightVisualOffset move.w #$12,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetRightVisualOffset ENDIF ; ; gxByteOffset GXGetLeftVisualOffset(gxShape layout, gxByteOffset currentOffset) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLeftVisualOffset move.w #$13,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLeftVisualOffset ENDIF ; ; void GXGetCompoundCharacterLimits(gxShape layout, gxByteOffset trial, gxByteOffset *minOffset, gxByteOffset *maxOffset, Boolean *onBoundary) ; IF ¬ GENERATINGCFM THEN Macro _GXGetCompoundCharacterLimits move.w #$14,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetCompoundCharacterLimits ENDIF ; ; void GXGetOffsetGlyphs(gxShape layout, gxByteOffset trial, long leadingEdge, gxLayoutOffsetState *offsetState, unsigned short *firstGlyph, unsigned short *secondGlyph) ; IF ¬ GENERATINGCFM THEN Macro _GXGetOffsetGlyphs move.w #$15,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetOffsetGlyphs ENDIF ; ; void GXGetGlyphOffset(gxShape layout, long trial, long onLeftTop, gxByteOffset *offset, Boolean *leadingEdge, Boolean *wasRealCharacter) ; IF ¬ GENERATINGCFM THEN Macro _GXGetGlyphOffset move.w #$16,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetGlyphOffset ENDIF ; ; void GXGetLayoutSpan(gxShape layout, Fixed *lineAscent, Fixed *lineDescent) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLayoutSpan move.w #$17,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLayoutSpan ENDIF ; ; void GXSetLayoutSpan(gxShape layout, Fixed lineAscent, Fixed lineDescent) ; IF ¬ GENERATINGCFM THEN Macro _GXSetLayoutSpan move.w #$18,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetLayoutSpan ENDIF ; ; Fixed GXGetLayoutJustificationGap(gxShape layout) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLayoutJustificationGap move.w #$279,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLayoutJustificationGap ENDIF ; ; void GXGetLayoutJustificationFactors(gxShape layout, Fixed constrainedFactors[], Fixed unconstrainedFactors[]) ; IF ¬ GENERATINGCFM THEN Macro _GXGetLayoutJustificationFactors move.w #$27A,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetLayoutJustificationFactors ENDIF ; ; void GXSetStyleRunControls(gxStyle target, const gxRunControls *runControls) ; IF ¬ GENERATINGCFM THEN Macro _GXSetStyleRunControls move.w #$19,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetStyleRunControls ENDIF ; ; void GXSetStyleRunPriorityJustOverride(gxStyle target, const gxPriorityJustificationOverride *priorityJustificationOverride) ; IF ¬ GENERATINGCFM THEN Macro _GXSetStyleRunPriorityJustOverride move.w #$1a,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetStyleRunPriorityJustOverride ENDIF ; ; void GXSetStyleRunGlyphJustOverrides(gxStyle target, long count, const gxGlyphJustificationOverride glyphJustificationOverrides[]) ; IF ¬ GENERATINGCFM THEN Macro _GXSetStyleRunGlyphJustOverrides move.w #$1b,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetStyleRunGlyphJustOverrides ENDIF ; ; void GXSetStyleRunGlyphSubstitutions(gxStyle target, long count, const gxGlyphSubstitution glyphSubstitutions[]) ; IF ¬ GENERATINGCFM THEN Macro _GXSetStyleRunGlyphSubstitutions move.w #$1c,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetStyleRunGlyphSubstitutions ENDIF ; ; void GXSetStyleRunFeatures(gxStyle target, long count, const gxRunFeature runFeatures[]) ; IF ¬ GENERATINGCFM THEN Macro _GXSetStyleRunFeatures move.w #$1d,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetStyleRunFeatures ENDIF ; ; void GXSetStyleRunKerningAdjustments(gxStyle target, long count, const gxKerningAdjustment kerningAdjustments[]) ; IF ¬ GENERATINGCFM THEN Macro _GXSetStyleRunKerningAdjustments move.w #$1e,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetStyleRunKerningAdjustments ENDIF ; ; void GXSetShapeRunControls(gxShape target, const gxRunControls *runControls) ; IF ¬ GENERATINGCFM THEN Macro _GXSetShapeRunControls move.w #$1f,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetShapeRunControls ENDIF ; ; void GXSetShapeRunPriorityJustOverride(gxShape target, const gxPriorityJustificationOverride *priorityJustificationOverride) ; IF ¬ GENERATINGCFM THEN Macro _GXSetShapeRunPriorityJustOverride move.w #$20,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetShapeRunPriorityJustOverride ENDIF ; ; void GXSetShapeRunGlyphJustOverrides(gxShape target, long count, const gxGlyphJustificationOverride glyphJustificationOverrides[]) ; IF ¬ GENERATINGCFM THEN Macro _GXSetShapeRunGlyphJustOverrides move.w #$21,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetShapeRunGlyphJustOverrides ENDIF ; ; void GXSetShapeRunGlyphSubstitutions(gxShape target, long count, const gxGlyphSubstitution glyphSubstitutions[]) ; IF ¬ GENERATINGCFM THEN Macro _GXSetShapeRunGlyphSubstitutions move.w #$22,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetShapeRunGlyphSubstitutions ENDIF ; ; void GXSetShapeRunFeatures(gxShape target, long count, const gxRunFeature runFeatures[]) ; IF ¬ GENERATINGCFM THEN Macro _GXSetShapeRunFeatures move.w #$23,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetShapeRunFeatures ENDIF ; ; void GXSetShapeRunKerningAdjustments(gxShape target, long count, const gxKerningAdjustment kerningAdjustments[]) ; IF ¬ GENERATINGCFM THEN Macro _GXSetShapeRunKerningAdjustments move.w #$24,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXSetShapeRunKerningAdjustments ENDIF ; ; long GXGetStyleRunControls(gxStyle source, gxRunControls *runControls) ; IF ¬ GENERATINGCFM THEN Macro _GXGetStyleRunControls move.w #$25,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetStyleRunControls ENDIF ; ; long GXGetStyleRunPriorityJustOverride(gxStyle source, gxPriorityJustificationOverride *priorityJustificationOverride) ; IF ¬ GENERATINGCFM THEN Macro _GXGetStyleRunPriorityJustOverride move.w #$26,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetStyleRunPriorityJustOverride ENDIF ; ; long GXGetStyleRunGlyphJustOverrides(gxStyle source, gxGlyphJustificationOverride glyphJustificationOverrides[]) ; IF ¬ GENERATINGCFM THEN Macro _GXGetStyleRunGlyphJustOverrides move.w #$27,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetStyleRunGlyphJustOverrides ENDIF ; ; long GXGetStyleRunGlyphSubstitutions(gxStyle source, gxGlyphSubstitution glyphSubstitutions[]) ; IF ¬ GENERATINGCFM THEN Macro _GXGetStyleRunGlyphSubstitutions move.w #$28,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetStyleRunGlyphSubstitutions ENDIF ; ; long GXGetStyleRunFeatures(gxStyle source, gxRunFeature runFeatures[]) ; IF ¬ GENERATINGCFM THEN Macro _GXGetStyleRunFeatures move.w #$29,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetStyleRunFeatures ENDIF ; ; long GXGetStyleRunKerningAdjustments(gxStyle source, gxKerningAdjustment kerningAdjustments[]) ; IF ¬ GENERATINGCFM THEN Macro _GXGetStyleRunKerningAdjustments move.w #$2a,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetStyleRunKerningAdjustments ENDIF ; ; long GXGetShapeRunControls(gxShape source, gxRunControls *runControls) ; IF ¬ GENERATINGCFM THEN Macro _GXGetShapeRunControls move.w #$2b,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetShapeRunControls ENDIF ; ; long GXGetShapeRunPriorityJustOverride(gxShape source, gxPriorityJustificationOverride *priorityJustificationOverride) ; IF ¬ GENERATINGCFM THEN Macro _GXGetShapeRunPriorityJustOverride move.w #$2c,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetShapeRunPriorityJustOverride ENDIF ; ; long GXGetShapeRunGlyphJustOverrides(gxShape source, gxGlyphJustificationOverride glyphJustificationOverrides[]) ; IF ¬ GENERATINGCFM THEN Macro _GXGetShapeRunGlyphJustOverrides move.w #$2d,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetShapeRunGlyphJustOverrides ENDIF ; ; long GXGetShapeRunGlyphSubstitutions(gxShape source, gxGlyphSubstitution glyphSubstitutions[]) ; IF ¬ GENERATINGCFM THEN Macro _GXGetShapeRunGlyphSubstitutions move.w #$2e,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetShapeRunGlyphSubstitutions ENDIF ; ; long GXGetShapeRunFeatures(gxShape source, gxRunFeature runFeatures[]) ; IF ¬ GENERATINGCFM THEN Macro _GXGetShapeRunFeatures move.w #$2f,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetShapeRunFeatures ENDIF ; ; long GXGetShapeRunKerningAdjustments(gxShape source, gxKerningAdjustment kerningAdjustments[]) ; IF ¬ GENERATINGCFM THEN Macro _GXGetShapeRunKerningAdjustments move.w #$30,d0 dc.w $A832 EndM ELSE IMPORT_CFM_FUNCTION GXGetShapeRunKerningAdjustments ENDIF ENDIF ; __GXLAYOUT__